#include "stm32f10x.h" 
#include "oled.h"
#include "delay.h"
#include "ad.h"

uint16_t ad_value0, ad_value1;

int main(void)
{
    OLED_Init();
    AD_Init();

    OLED_ShowString(1, 1, "AD_Value0:");
    OLED_ShowString(2, 1, "AD_Value1:");

    while (1) 
    {
        ad_value0 = AD_GetValue(ADC_CHANNEL0);
        ad_value1 = AD_GetValue(ADC_CHANNEL1);

        OLED_ShowNum(1, 11, ad_value0, 4);
        OLED_ShowNum(2, 11, ad_value1, 4);

        Delay_ms(100);
    }
}
